<?php
include "config.php";
if (isset($_GET['pass']) && $rarinputauto == "0")
{
$file = $_GET['file'];
echo ('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Rapidshare Upload Script RAR</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body>'."\n");
echo ('<table><tr><td><form method="post" action="rar.php">
<input type="text" name="password" value="'."$rarpassword".'">Das gew&uuml;nschtes Passwort
<br>
<input type="text" name="size" value="'."$rarsize".'">Die gew&uuml;nschte Filesize in kB
<br>
<INPUT type=submit value="Abschicken">
<input type=hidden name=file value="'.$file.'">

</form></td></tr></table>');
echo ('<table>
<tr>
<td><td><a href="index.php">Zur&uuml;ck</a></td>'."\n".'</tr></table>');
}
elseif (isset($_GET['file']) && $rarinputauto == "1" && isset($_GET['pass']))
{
$size = $rarsize;
$password = $rarpassword;

$file = $_GET['file'].$_POST['file'];
exec ("rar/rar_static a -ep1 -v$size -p$password $path/$file.rar $path/$file");
header("Location: index.php");
}
elseif (isset($_GET['file']) || isset($_POST['file']))
{
if (isset($_POST['password']) || intval($_POST['size']))
{
$size = $_POST['size'];
$password = $_POST['password'];
}
$file = $_GET['file'].$_POST['file'];
exec ("rar/rar_static a -ep1 -v$size -p$password $path/$file.rar $path/$file");
header("Location: index.php");
}
echo ('
</body>
</html>
');
?>
